#ifndef _MPU_TIME_INIT_H_
#define _MPU_TIME_INIT_H_

#include "stm32f4xx.h"    

#define LIMIT( x,min,max ) ( (x) < (min)  ? (min) : ( (x) > (max) ? (max) : (x) ) )


		
typedef struct
{
  float Last_Time;
  float Now_Time;
  float Time_Delta;
}TIME_Handle;


u8 PWM_Out_Init_TIM1(uint16_t hz);
u8 PWM_Out_Init_TIM2(uint16_t hz);
u8 PWM_Out_Init_TIM3(uint16_t hz);
void TIM7_Configuration(void);
void TIM8_Configuration(void);
uint32_t Get_Time_Micros(void);
double Get_Sys_Ticks(void);
float Get_Sys_Ticks_float_ms(void);

void MPU_PWM_TIM2(void);

#endif


